















<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2025/4/29
  Time: 9:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>人员列表</title>
  <style>
    body {
      font-family: 'Arial', sans-serif;
      margin: 0;
      padding: 20px;
      background-color: #f5f7fa;
    }

    .container {
      max-width: 1000px;
      margin: 0 auto;
      background-color: white;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
      padding: 20px;
    }

    h1 {
      color: #333;
      text-align: center;
      margin-bottom: 25px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 20px;
    }

    th {
      background-color: #4CAF50;
      color: white;
      padding: 12px;
      text-align: left;
    }

    td {
      padding: 12px;
      border-bottom: 1px solid #e0e0e0;
    }

    tr:nth-child(even) {
      background-color: #f2f9ff;
    }

    tr:hover {
      background-color: #e8f4fc;
    }

    .delete-btn {
      color: #e74c3c;
      text-decoration: none;
      font-weight: bold;
    }

    .delete-btn:hover {
      text-decoration: underline;
    }

    .add-btn {
      display: block;
      width: 150px;
      background-color: #3498db;
      color: white;
      text-align: center;
      padding: 10px;
      border-radius: 4px;
      text-decoration: none;
      margin: 0 auto;
      font-weight: bold;
    }

    .add-btn:hover {
      background-color: #2980b9;
    }
  </style>
</head>
<body>
<div class="container">
  <h1>人员列表</h1>

  <table>
    <thead>
    <tr>
      <th>编号</th>
      <th>姓名</th>
      <th>性别</th>
      <th>年龄</th>
      <th>等级</th>
      <th>部门</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${me}" var="mm">
      <tr>
        <td>${mm.id}</td>
        <td>${mm.name}</td>
        <td>${mm.sex}</td>
        <td>${mm.age}</td>
        <td>${mm.rank}</td>
        <td>${mm.department}</td>
        <td><a href="<%=request.getContextPath()%>/personController?op=sb&id=${mm.id}" class="delete-btn">删除</a></td>
      </tr>
    </c:forEach>
    </tbody>
  </table>

  <a href="aaa.jsp"   class="add-btn">添加人员</a>
</div>
</body>
</html>

